/*
 * 价格格式化的mixins
 * @Author: ljb
 * @Date: 2018-11-14 15:11:02
 * @Last Modified by:ljb
 * @Last Modified time: 2018-11-14 15:11:02
 */
export const formatPrice = {
	name: 'formatPrice',
	data() {
		return {

		};
	},
	methods: {
		/**
         * 格式化价格，并改变显示
         * @param  {String|Number} price {价格}
         * @return {String} {格式化后的价格}
         */
		formatPrice(price) {
			return parseFloat(price).toFixed(2);
		},
	},
};
